package com;

import org.apache.commons.lang3.StringUtils;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.List;

public class IdsRelation {

    public static void main(String[] args) throws  Exception {

        File file = new File("D:/p.txt");
        BufferedReader br = new BufferedReader(new FileReader(file));
        List<String> list = new ArrayList<String>();
        String lines = "";
        while((lines=br.readLine())!=null){
            list.add(lines);
        }

        br.close();

        for(int i=0;i<list.size();i++){
            System.out.println(list.get(i));
        }
        System.out.println(list.size());
        System.out.println(StringUtils.join(list,","));
    }
}
